<?php


namespace app\validate;

use think\Validate;

class OrderCheck extends Validate
{

    protected $rule = [
        'member_id' => 'require',
        'user_id' => 'require',

        'type' => 'require',
        'car_id' => 'require',
        'page'=>'require',
        'menu_type'=>'require',
        'order_id'=>'require',
        'content'=>'require'
    ];

    protected $message = [
        'member_id.require' => '用户id不能为空',
        'user_id.require' => '用户id不能为空',

        'type.require' => '订单类型不能为空',
        'car_id.require' => '请选择您的爱车',
        'page.require' => '请上传您的页码',
        'menu_type.require' => '请选择订单类型',
        'order_id.require' => '订单id不能为空',
        'content.require' => '订单内容不能为空',
    ];

    protected $scene = [
        'create_order' => ['member_id','type'],
        'my_order' => ['member_id','page','menu_type'],
        'master_order' => ['user_id','menu_type'],
        'amount_pay'=>['member_id','order_id'],
        'evaluate'=>['user_id','order_id','content'],
    ];
}